package com.atguigu.proxy.impl;

import com.atguigu.proxy.api.Calculator;

public class CalculatorImpl implements Calculator {

    @Override
    public int add(int i, int j) {
        System.out.println("add方法开始了，入参列表是：" + i + "," + j);
        int result = i + j;
        System.out.println("add方法结束了，返回值是：" + result);

        return result;
    }

    @Override
    public int sub(int i, int j) {
        System.out.println("sub方法开始了，入参列表是：" + i + "," + j);
        int result = i - j;
        System.out.println("sub方法结束了，返回值是：" + result);

        return result;
    }

    @Override
    public int mul(int i, int j) {
        System.out.println("mul方法开始了，入参列表是：" + i + "," + j);
        int result = i * j;
        System.out.println("mul方法结束了，返回值是：" + result);

        return result;
    }

    @Override
    public int div(int i, int j) {
        System.out.println("div方法开始了，入参列表是：" + i + "," + j);
        int result = i / j;
        System.out.println("div方法结束了，返回值是：" + result);

        return result;
    }
}
